Rotating Circle

Charlie Veniot5th August 2022 at 11:32pm
' Based on https://github.com/Zannick/qbasic-programs/blob/master/ROTATE.BAS by Benjamin Wolf (April 8, 2003)
' BASIC Anywhere Machine version by Charlie Veniot
' Added color to the CIRCLE statement (required in BASIC Anywhere Machine)
' Increased the radius of the circle to fill the screen
' Added a smaller filled circle "inside" the bigger circle
' Added a very small delay

SCREEN 12 : x = 0.5
DO
  CLS
  if x < 1 then
    CIRCLE (320, 240), 230, 11
    CIRCLE (320, 240), 75, 11, , , , F
  else
    CIRCLE (320, 240), 230, 11, , , x
    CIRCLE (320, 240), 75, 11, , , x, F
  end if
  if int(x*250000) < 1000000 then
    FOR z = 1 TO 1000000 - int(x * 250000)
    NEXT z
  end if
  _delay 0.00125 ' added to make sure the screen gets refreshed before CLS in the next loop
  IF x = 75 THEN y = 2
  IF x < 1 THEN y = 1
  SELECT CASE y
     CASE 1
        x = x + 0.5
     CASE 2
        x = x - 0.5
  END SELECT
LOOP